'use strict';

/* 用户信息 - 数据模型 */
module.exports = app => {
  const ctx = app.createAnonymousContext();
  ctx.populate("chat", {
    message: "message"
  })
  return ctx.helper.model('chat', {

    user: {
      type: String,
      //ref : "user"
    },
    touser: {
      type: String,
      ref: "user"
    },
    message: {
      type: String,
      displayname: "发送的消息"
    },
    img: {
      type: String,
      displayName: "聊天图片"
    }
  });
};
